Public Class SforceServiceWrapper
    Inherits sforce.SforceService

    Private _acceptZippedResponse As Boolean
    Private _sendZippedRequest As Boolean

    Public Property SendZippedRequest() As Boolean
        Get
            Return _sendZippedRequest
        End Get
        Set(ByVal Value As Boolean)
            _sendZippedRequest = Value
        End Set
    End Property

    Public Property AcceptZippedResponse() As Boolean
        Get
            Return _acceptZippedResponse
        End Get
        Set(ByVal Value As Boolean)
            _acceptZippedResponse = Value
        End Set
    End Property

    Public Sub New(ByVal acceptZippedResponse As Boolean, ByVal sendZippedRequest As Boolean)
        _acceptZippedResponse = acceptZippedResponse
        _sendZippedRequest = sendZippedRequest
    End Sub

    Public Sub New()
        _acceptZippedResponse = False
        _sendZippedRequest = False
    End Sub

    Protected Overrides Function GetWebRequest(ByVal uri As Uri) As System.Net.WebRequest
        Return New WebRequestWrapper(MyBase.GetWebRequest(uri), SendZippedRequest, AcceptZippedResponse)
    End Function
End Class
